#include <vector>
#include <iostream>
#include <algorithm>

void vectortest()
	{
		std::vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.insert(v.end(), 30);
		/*v.pop_back();
		v.pop_back();
		v.pop_back();
		v.pop_back();*/
		for (size_t i = 0; i < v.size(); ++i)
		{
			std::cout << v[i] << " ";
		}
		std::cout << std::endl;
		auto pos = std::find(v.begin(), v.end(), 3);
		v.erase(v.begin());
		std::vector<int>::iterator it = v.begin();
		while (it != v.end())
		{
			std::cout << *it << " ";
			++it;
		}
		std::cout << std::endl;
    (*pos)++;
		for (auto e : v)
		{
			std::cout << e << " ";
		}
		std::cout << std::endl;
	}

int main()
{
  vectortest();
  return 0;
}
